package com.cykj.handler;

import com.cykj.entity.UserEntity;
import com.cykj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//@Controller   //String 请求转发  页面
@RestController  //String  内容应答
public class TestHandler {
    @Autowired
    private UserService tblUserService;

    @RequestMapping("/test1")
    public List<UserEntity> login(){
        List<UserEntity> list = tblUserService.find();
        System.out.println(list);
        return list;
    }
}
